//使用本页面引用的消息弹窗，不需要传_this参数
import {Message} from 'element-ui'
import { Message as MessageIview } from 'view-design'

MessageIview.config({
    duration: 3
})

class MessageHelper {
    static messageInfo(info) {
        Message.closeAll();
        Message.info(info);
    }

    static messageSuccess(info) {
        Message.closeAll();
        Message.success(info);
    }

    static messageWarning(info) {
        Message.closeAll();
        Message.warning(info);
    }

    static messageError(info) {
        Message.closeAll();
        Message.error(info);
    }

    static MessageSuccess(info) {
        MessageIview.destroy();
        MessageIview.success(info);
    }

    static MessageWarning(info) {
        MessageIview.destroy();
        MessageIview.warning(info);
    }

    static MessageError(info) {
        MessageIview.destroy();
        MessageIview.error(info);
    }

    static MessageInfo(info) {
        MessageIview.destroy();
        MessageIview.info(info);
    }

}

export default MessageHelper
